﻿@model VietPremier.Models.GetStyleModel
@using VietPremier.Repository

@{
    if (Model != null)
    {
        ViewBag.Title = Model.style.Titletag;
        ViewBag.Description = Model.style.Meta_description;
        ViewBag.Keywords = Model.style.Meta_keyword;
    }
}

<div class="content container-fluid">
    <div class="row-fluid">
        <div class="span3">
            @Html.Partial("_Maps")
            <!--/ .box-->
            @Html.Action("Onlinesupport", "Home")
            <!--/ .support-->
            @*@Html.Action("Spotlight", "Home")*@
            <!--/ .box-->
            @Html.Action("News_Event", "Home")
            <!--/ .box-->
        </div>
        <!--/ .span3-->
        <div class="span9">
            <div class="link-page">
                <a href="@Url.Action("Index", "Home")">Trang chủ&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")">&nbsp;</a>
                <a href="#">Phong cách du lịch&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")">&nbsp;</a>
                <span>@Model.style.Name</span>
            </div>
            <div class="box-about">
                <h5>@Model.style.Name</h5>
                <div class="vietnam">
                    <div class="row-fluid">
                        @{
                            if (Model.listTravelCity.Count() > 0)
                            {
                                int count = Model.listTravelCity.Count;
                            <div class="span6 wheretosay">

                                @for (int i = 0; i < (count % 2 == 0 ? count / 2 : count / 2 + 1); i++)
                                {
                                    var imageFile = string.Concat("~/Content/upload/travelcity/", Model.listTravelCity[2 * i].Image);  
                                    <div class="it">
                                        <div class="img">
                                            <div class="img-inner">
                                                <a href="@Url.Action("TravelDetail", "Style", new { city = Utilities.Encode(Model.listTravelCity[2 * i].Name), title = Utilities.Encode(Model.style.Name) })">
                                                    <img src= "@Url.Content(imageFile)" style="width:100px; height:100px" alt="" />
                                                </a>
                                            </div>
                                        </div>
                                        <h4><a class="title" href="@Url.Action("TravelDetail", "Style", new { city = Utilities.Encode(Model.listTravelCity[2 * i].Name), title = Utilities.Encode(Model.style.Name)})">@Model.listTravelCity[2 * i].Name</a></h4>
                                        <small class="price">Giá: @Model.listTravelCity[2 * i].Price</small>
                                        @*<small class="tripcode">Mã: @Model.listTravelCity[2 * i].TripCode</small>*@
                                        <small class="tripcode">Thời gian: @Model.listTravelCity[2 * i].Time</small>
                                        <small class="journey">@Model.listTravelCity[2 * i].Duration</small>
                                    </div>
                                    <!--/ .it-->
                                }
                            </div>
                            <div class="span6 wheretosay">

                                @for (int i = 0; i < (count % 2 == 0 ? count / 2 : count / 2 + 1); i++)
                                {
                                    if (2 * i + 1 < count)
                                    {
                                        var imageFile = string.Concat("~/Content/upload/travelcity/", Model.listTravelCity[2 * i + 1].Image);
                                    <div class="it">
                                        <div class="img">
                                            <div class="img-inner">
                                                <a href="@Url.Action("TravelDetail", "Style", new { city = Utilities.Encode(Model.listTravelCity[2 * i + 1].Name), title = Utilities.Encode(Model.style.Name) })">
                                                    <img src= "@Url.Content(imageFile)" style="width:100px; height:100px" alt="" />
                                                </a>
                                            </div>
                                        </div>
                                        <h4><a class="title" href="@Url.Action("TravelDetail", "Style", new { city = Utilities.Encode(Model.listTravelCity[2 * i + 1].Name), title = Utilities.Encode(Model.style.Name) })">@Model.listTravelCity[2 * i + 1].Name</a></h4>
                                        <small class="price">Giá: @Model.listTravelCity[2 * i + 1].Price</small>
                                        @*<small class="tripcode">Mã: @Model.listTravelCity[2 * i + 1].TripCode</small>*@
                                        <small class="tripcode">Thời gian: @Model.listTravelCity[2 * i + 1].Time</small>
                                        <small class="journey">@Model.listTravelCity[2 * i + 1].Duration</small>
                                    </div>
                                    <!--/ .it-->
                                    }
                                }
                            </div>
                            }
                        }
                        <div class="pagination pagination-centered">
                            <ul>
                                @if (Model.PagingInfo.TotalPages > 1)
                                {
                                    @Html.PageLinks(Model.PagingInfo, x => Url.Action("TravelStyle", new { title = Utilities.Encode(Model.style.Name), page = x }))    
                                }
                            </ul>
                        </div>
                        <!--/ .pagination-->
                    </div>
                    <!--/ .row-fluid-->
                </div>
                <!--/ .vietnam-->
            </div>
            <!--/ .box-about-->
        </div>
    </div>
    <!--/ .row-fluid-->
</div>
<!--/.container-fluid -->
